package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@TableName(value = "position")
public class Position  {
    @TableId(value = "id")
    private String id; //主键
    @TableField(value = "position_detail_url")
    private String positionDetailUrl;
    @TableField(value = "position_name")
    private String positionName;
    @TableField(value = "first_type")
    private String firstType;
    @TableField(value = "second_type")
    private String secondType;
    @TableField(value = "third_type")
    private String thirdType; //类别对应java之类的
    @TableField("publish_time")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date publishTime; //职位发布日期
    @TableField(value = "salary")
    private String salary;
    @TableField(value = "avg_salary")
    private String avgSalary;
    @TableField(value = "workyear")
    private String workyear; //工作经验
    /**
     * {'不要求': '1' , '不限': '1',
     *                   '应届毕业生': '2',
     *                   '1-3年': '3' , '3年以下': '3',
     *                   '3-5年': '4',
     *                   '5-10年': '5',
     *                   '10年以上': '6'}
     */
    @TableField("education")
    private String education; //学历
    /**
     *  {'不要求': '1' , '不限': '1',
     *                   '大专': '2',
     *                   '本科': '3' , '硕士': '3',
     *                   '博士': '4'}
     */
    @TableField("job_nature")
    private String jobNature;
    /**
     *                  {'全职': '1',
     *                    '兼职': '2',
     *                    '实习': '3'}
     */
    @TableField("position_advantage")
    private String positionAdvantage;
    @TableField("city")
    private String city; //公司所在城市
    @TableField("district")
    private String district; //公司所在行政区

    @TableField("latitude")
    private String latitude;
    @TableField("longitude")
    private String longitude;
    @TableField("company_fullname")
    private String companyFullname;
    @TableField("company_url")
    private String companyUrl;
    @TableField("company_logo_url")
    private String companyLogoUrl;
    @TableField("company_field")
    private String companyField;
    @TableField("company_size")
    private String companySize; //公司规模
    /**
     *                      {'少于15人': '1',
     *                      '15-50人': '2',
     *                      '50-150人': '3', '150-500人': '3',
     *                      '500-2000人': '4',
     *                      '2000人以上': '5'}
     */
    @TableField("company_label_list")
    private String companyLabelList;
    @TableField("company_famous")
    private String companyFamous; //是否为知名企业 1-知名
    @TableField("status")

    private String status;

    @JsonIgnore//返回时忽略
    @TableField(exist = false)
    private String company;
    @JsonIgnore
    @TableField(exist = false)
    private String location;
    @JsonIgnore
    @TableField(exist = false)
    private String type;
    @JsonIgnore
    @TableField(exist = false)
    private Integer slider_begin;
    @JsonIgnore
    @TableField(exist = false)
    private Integer slider_end;
}
